<template>
  <input v-model="model" @input="filterNumber">
  <button @click="handClick">点击</button>
</template>

<script setup>
const model=defineModel({ required: true})
const handClick = () => {
    console.log(model.value)
    model.value++
}
const filterNumber = () => {
    model.value = model.value.replace(/\D/g,'')
}


</script>

<style  lang="scss" scoped>
</style>